package com.plug.common.model;


import com.plug.common.consts.Code;

/**
 * 异常结果返回模型
 *
 * @author Archx[archx@foxmail.com]
 * @date 2016/3/21 0021
 */
public class ExceptionResult extends AbstractResult {
    private static final long serialVersionUID = 5441182695442926783L;

    /**
     * 异常名称
     */
    private String exception;

    public ExceptionResult() {
        setCode(Code.ERR_EXCEPTION_OCCURS);
        setMessage("Exception");
    }

    public ExceptionResult(Exception ex) {
        this();
        this.exception = ex.getClass().getName();
        this.message = ex.getMessage();
    }

    public String getException() {
        return exception;
    }

    public void setException(String exception) {
        this.exception = exception;
    }
}
